
import  { App } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { useHomeStore } from './module/home'
import { useEmergencyStore } from './module/emergency'
import { useLoginStore } from './module/login'
import { useOtherStore } from './module/other';
import { useLocationStore } from './module/location';
import { useTableColStore } from './module/tableCol';
import { useChatStore } from './module/chat'
import { useBaseStore } from './busi/base';

import { useProcessEventStore } from './bpm/processevent'
import { useProcessParamsStore } from './bpm/processparams'
import { useTaskRuleStore } from './bpm/taskRule'

export const pinia = createPinia();

pinia.use(piniaPluginPersistedstate)

export function setupPinia(app: App<Element>) {
  app.use(pinia);
}

export { 
  useHomeStore, 
  useEmergencyStore, 
  useLoginStore,
  useBaseStore,
  useOtherStore,
  useLocationStore,
  useTableColStore,
  useChatStore,

  useProcessEventStore,
  useProcessParamsStore,
  useTaskRuleStore
};